package com.roamer.school.repository.enums;

import com.baomidou.mybatisplus.core.enums.IEnum;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonValue;

/**
 * 资源类型枚举
 *
 * @author roamer
 * @version V1.0
 * @date 2019/1/6 20:12
 */
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum ResourceTypeEnum implements IEnum<Integer> {

    /** 目录 */
    DIR(0, "目录"),

    /** 菜单 */
    MENU(1, "菜单"),

    /** 按钮 */
    BUTTON(2, "按钮"),

    /** 链接 */
    LINK(3, "链接");

    private Integer value;

    private String desc;

    ResourceTypeEnum(Integer value, String desc) {
        this.value = value;
        this.desc = desc;
    }

    @Override
    public Integer getValue() {
        return value;
    }

    @JsonValue
    public String getDesc() {
        return desc;
    }


}
